package com.neuedu.pay.controller;

import com.neuedu.pay.service.PayService;
import com.neuedu.pay.service.PayServiceImpl;
import com.neuedu.po.Pay;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/pay")
public class PayController {
    @Autowired
    private PayService Service;
    @Autowired
    private PayServiceImpl payServiceImpl;

    @RequestMapping("/selectAll")
    public List<Pay> selectAll(Pay p){
        return Service.selectAll(p);
    }
    @RequestMapping("/add")
    public int add(Pay p){
        return Service.add(p);
    }
    @RequestMapping("/update")
    public int update(Pay p){
        return Service.update(p);
    }
    @RequestMapping("/delete")
    public int delete(Pay p){
        return Service.delete(p);
    }
}
